import sys
from PyQt5.QtWidgets import QApplication, QWidget, QMainWindow
from MW3 import Ui_Dialog3
import demo3


class mwindow3(QWidget, Ui_Dialog3):
    def __init__(self):
        super(mwindow3, self).__init__()
        self.setupUi(self)
        self.connecter()

    def pb(self):
        demo3.main()

    def connecter(self):
        self.pushButton.clicked.connect(self.pb)
        self.pushButton_2.clicked.connect(self.close)


if __name__ == '__main__':
    app = QApplication(sys.argv)
    w = mwindow3()
    w.show()
    sys.exit(app.exec_())